from app.app import create_front
from fastapi import Request
from app.core.temp import render,static_dir
from fastapi.staticfiles import StaticFiles
# 容器运行入口
app = create_front()
app.mount("/assets", StaticFiles(directory=static_dir.as_posix()), name="")
@app.get("/")
async def home(request:Request):
    return render('index.html', {"request": request})
if __name__ == '__main__':
    import uvicorn

    uvicorn.run(app, host='0.0.0.0', port=8002)
